﻿/// <summary>
/// Http Rest API
/// </summary>
namespace RestAPI
{
    /*========================
     * 视频会议
     * 视频会议控制
     ========================*/

    /// <summary>
    /// 视频会议
    /// </summary>
    public class WebVideoConfCall : RestAPIModelBase
    {
        /// <summary>
        /// 视频会议
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="callflowid">会议流水号</param>
        /// <param name="calling">会议大画面号码</param>
        /// <param name="called">会议其他参与者号码，用英文“^”号分割</param>
        /// <param name="callback">呼叫结果回调地址</param>
        /// <param name="callmode">呼叫模式0_不录制视频1_需要录制视频</param>
        /// <param name="screenmode">
        ///         视频会议屏幕模式，默认为1：
        ///         0_直播模式
        ///         1_两方视频通话（音量大的自动为主画面）
        ///         2_等大画面视频会议
        ///         3_一大多小画面视频会议（带大画面切换功能）
        /// </param>
        /// <param name="picnum">视频会议多画面时，最大显示方数（目前支持4和6）</param>
        public WebVideoConfCall(string companyid, string calling, string called, string callmode, string screenmode = null, string picnum = null, string title = null, string rtmppush = null)
        {
            Companyid = companyid;
            //CallFlowid = callflowid;
            Calling = calling;
            Called = called;
            //Callback = callback;
            Callmode = callmode;
            Screenmode = screenmode;
            Picnum = picnum;
            Title = title;
            Rtmppush = rtmppush;
            SetCallBack();
        }

        public override void SetCallBack()
        {
            ServiceCallBack = new CallBackBase(CallBackService.confcallback, this);
        }
    }

    /// <summary>
    /// 视频会议控制-增加参与方
    /// </summary>
    public class WebVideoConfCtrlAdd : RestAPIModelBase
    {
        /// <summary>
        /// 视频会议控制-增加参与方
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="callflowid">会议流水号</param>
        /// <param name="calling">需要加入会议的参与方</param>
        /// <param name="callback">呼叫结果回调地址</param>
        /// <param name="confid">confcall接口返回的会议id</param>
        public WebVideoConfCtrlAdd(string companyid, string calling, string confid)
        {
            Companyid = companyid;
            //CallFlowid = callflowid;
            Calling = calling;
            //Callback = callback;
            Confid = confid;
        }

        public override void SetCallBack()
        {
            ServiceCallBack = new CallBackBase(CallBackService.addCalled, this);
        }
    }

    /// <summary>
    /// 视频会议控制-减少参与方
    /// </summary>
    public class WebVideoConfCtrlDel : RestAPIModelBase
    {
        /// <summary>
        /// 视频会议控制-减少参与方
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="callflowid">会议流水号</param>
        /// <param name="calling">需要加入会议的参与方</param>
        /// <param name="callback">呼叫结果回调地址</param>
        /// <param name="confid">confcall接口返回的会议id</param>
        public WebVideoConfCtrlDel(string companyid, string calling, string confid)
        {
            Companyid = companyid;
            //CallFlowid = callflowid;
            Calling = calling;
            //Callback = callback;
            Confid = confid;
        }

        public override void SetCallBack()
        {
            ServiceCallBack = new CallBackBase(CallBackService.deleteCalled, this);
        }
    }

    /// <summary>
    /// 视频会议控制-结束会议
    /// </summary>
    public class WebVideoConfCtrlHalt : RestAPIModelBase
    {
        /// <summary>
        /// 视频会议控制-结束会议
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="callflowid">会议流水号</param>
        /// <param name="calling">需要加入会议的参与方</param>
        /// <param name="callback">呼叫结果回调地址</param>
        /// <param name="confid">confcall接口返回的会议id</param>
        public WebVideoConfCtrlHalt(string companyid, string confid)
        {
            Companyid = companyid;
            //CallFlowid = callflowid;
            //Calling = calling;
            //Callback = callback;
            Confid = confid;
        }

        public override void SetCallBack()
        {
            ServiceCallBack = new CallBackBase(CallBackService.overConF, this);
        }
    }

    /// <summary>
    /// 视频会议控制-设置大画面
    /// </summary>
    public class WebVideoConfCtrlView : RestAPIModelBase
    {
        /// <summary>
        /// 视频会议控制-设置大画面
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="callflowid">会议流水号</param>
        /// <param name="calling">需要加入会议的参与方</param>
        /// <param name="callback">呼叫结果回调地址</param>
        /// <param name="confid">confcall接口返回的会议id</param>
        public WebVideoConfCtrlView(string companyid, string calling, string confid)
        {
            Companyid = companyid;
            //CallFlowid = callflowid;
            Calling = calling;
            //Callback = callback;
            Confid = confid;
        }

        public override void SetCallBack()
        {
            ServiceCallBack = new CallBackBase(CallBackService.setBigView, this);
        }
    }

    /// <summary>
    /// 查询会议状态
    /// </summary>
    public class WebVideoConfInfo : RestAPIModelBase
    {
        /// <summary>
        /// 查询会议状态
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="confid">可选条件，会议ID</param>
        /// <param name="status">可选条件，0是未开始，1是会议中，2是已结束</param>
        /// <param name="pageno">分页参数，页码</param>
        /// <param name="pagesize">分页参数，每页记录数</param>
        public WebVideoConfInfo(string companyid, string confid = null, string status = null, string pageno = null, string pagesize = null)
        {
            Companyid = companyid;
            Confid = confid;
            Status = status;
            Pageno = pageno;
            Pagesize = pagesize;
        }

        public override void SetCallBack()
        {
            ServiceCallBack = new CallBackBase(CallBackService.updateVideoStream, this);
        }
    }

    /// <summary>
    /// 查询会议成员状态
    /// </summary>
    public class WebVideoConfMemberInfo : RestAPIModelBase
    {
        /// <summary>
        /// 查询会议成员状态
        /// </summary>
        /// <param name="companyid">企业编号</param>
        /// <param name="confid">会议ID</param>
        public WebVideoConfMemberInfo(string companyid, string confid, string status = null)
        {
            Companyid = companyid;
            Confid = confid;
            Status = status;
        }
    }

    /// <summary>
    /// 视频会议广播消息
    /// </summary>
    public class WebVideoConfMsg : RestAPIModelBase
    {
        public WebVideoConfMsg(string companyid, string confid, string msg)
        {
            Companyid = companyid;
            Confid = confid;
            Content = msg;
        }
    }

    /// <summary>
    /// 控制静音哑音
    /// </summary>
    public class WebVideoConfsilence : RestAPIModelBase
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="companyid">企业编号，保存在系统的唯一编号</param>
        /// <param name="confid">confcall接口返回的会议id</param>
        /// <param name="calling">操作方号码</param>
        /// <param name="operation">1-哑音;2-取消哑音;9-静音;10-取消静音</param>
        public WebVideoConfsilence(string companyid, string confid, string calling, string operation)
        {
            Companyid = companyid;
            Confid = confid;
            Calling = calling;
            Operation = operation;
        }
    }

    /// <summary>
    /// 设置画面布局#
    /// </summary>
    public class WebVideoConfScreen : RestAPIModelBase
    {
        public WebVideoConfScreen(string companyid, string confid, string screenmode)
        {
            Companyid = companyid;
            Confid = confid;
            Screenmode = screenmode;
        }
    }
}
